package cn.sunxyz.struct.facade;

/**
 * Created by yangrd on 2017/5/12.
 */
public class Systems {
    public static void main(String[] args) {
        Facade facade = new Facade();
        facade.Method();
    }
}

class Facade {
    private SubSystemA obj1 = new SubSystemA();
    private SubSystemB obj2 = new SubSystemB();
    private SubSystemC obj3 = new SubSystemC();

    public void Method() {
        obj1.MethodA();
        obj2.MethodB();
        obj3.MethodC();
    }
}

class SubSystemA {
    public void MethodA() {
        //业务实现代码
        System.out.println("SubSystemA");
    }
}

class SubSystemB {
    public void MethodB() {
        //业务实现代码
        System.out.println("SubSystemB");
    }
}

class SubSystemC {
    public void MethodC() {
        //业务实现代码
        System.out.println("SubSystemC");
    }
}
